# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(custom.GStreamer):
    name = 'gst-plugins-ugly-1.0'
    config_sh = 'sh ./autogen.sh --noconfigure && ./configure'
    configure_options = "--enable-static --disable-examples --disable-iec958 --disable-mpegstream --disable-cdio --disable-sidplay --disable-twolame "
    remotes = {'origin': 'git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly'}
    commit = '861cff5da13614f50636681d9039a731e279b695'
    deps = ['gstreamer-1.0', 'gst-plugins-base-1.0', 'x264']

    files_plugins_codecs_restricted = [
             'lib/gstreamer-1.0/libgstx264%(mext)s',
    ]

    files_plugins_codecs_restricted_devel = [
             'lib/gstreamer-1.0/libgstx264.a', 'lib/gstreamer-1.0/libgstx264.la',
    ]

    files_plugins_dvd = [
    ]

    files_plugins_dvd_devel = [
    ]

    files_lang = ['gst-plugins-ugly-1.0']

    def prepare(self):
        self.append_env['CFLAGS'] = " -Wno-error "
        self.append_env['CXXFLAGS'] = " -Wno-error "
        self.append_env['CPPFLAGS'] = " -Wno-error "
        if self.config.target_platform != Platform.LINUX:
            self.configure_options += ' --disable-gtk-doc'

        if self.config.variants.nodebug:
            self.append_env['CFLAGS'] += ' -DGST_LEVEL_MAX=GST_LEVEL_FIXME'
